package chapter4.No4_1_使用reentrantLock类.demo16;

/**
 * *：
 *   awaitUninterruptibly()的使用
 *   如果interrupt遇见await方法会异常
 *               遇见awaitUninterruptibly()不会报异常
 * Created by Administrator on 2016/11/22.
 */
public class Main {

    public static void main(String[] args) {
        final ServiceClass sc = new ServiceClass();
        Runnable runnable = new Runnable() {
            public void run() {
                sc.methodA();
            }
        };
        Thread a = new Thread(runnable);
        a.start();
        a.interrupt();
    }

}
